<template>
    <div>
        <div>积分明细</div>
        <div style="height: 500px;width: 100%;">
            <!-- 
                <template #default="{ height, width }">
                    <el-table-v2 :columns="columns" :data="data" :width="width" :height="height" fixed />
                </template>
            </el-auto-resizer> -->
            <el-auto-resizer>
                <template #default="">
                    <el-table-v2 :columns="columns2" :data="data2" :width="450" :height="500" fixed style="margin: 0 auto;"/>
                </template>
            </el-auto-resizer>
        </div>
    </div>
</template>
<script setup lang="ts">
import { getnumberjifen } from '../../../api/membersettingApi'
import { useCounterStore } from '@/stores/counter'
import { storeToRefs } from 'pinia'
const store = useCounterStore()
const { count } = storeToRefs(store)
let getdata = async () => {
    let get = await getnumberjifen({
        vipId: count.value
    })
   if(get)
   data2.length = 0
   data2.push(...get.data.data)

}
getdata()
const columns2=[
    {key:'dealTime',dataKey:'dealTime',title:'交易时间',width:80},
    {key:'dealType',dataKey:'dealType',title:'交易类型',width:80},
    {key:'alterIntegral',dataKey:'alterIntegral',title:'变动积分',width:80},
    {key:'currentIntegral',dataKey:'currentIntegral',title:'剩余积分',width:80},
    {key:'remark',dataKey:'remark',title:'备注',width:130}
]
const data2=reactive([
    {dealTime:'1',dealType:'1',alterIntegral:'1',currentIntegral:'1',remark:'1'},
    
])
const tabletitle = ['交易时间', '交易类型', '变动积分', '剩余积分', '备注', '实收款']



</script>
<style></style>